package com.zb.designmode.bridge.readthing;

import com.zb.designmode.bridge.readthing.read.impl.TextRead;
import com.zb.designmode.bridge.readthing.stream.AbstractStream;
import com.zb.designmode.bridge.readthing.stream.impl.URLStream;
import com.zb.designmode.bridge.readthing.thing.AbstractThing;
import com.zb.designmode.bridge.readthing.thing.impl.URLFile;

/**
 * <p>description：</p>
 * <p>copyright： copyright(C)2016-2099</p>
 * <p>Life is short,we need passion</p>
 * <p>Summary： </p>
 * <p>instructions： </p>
 * Date 3/16/21</p>
 * Author mac
 *
 * @version 1.0
 */
public class Test {
    public static void main(String[] args) throws Exception {
        AbstractStream in = new URLStream("https://www.baidu.com/");
        TextRead textRead = new TextRead(in);

        AbstractThing thing = new URLFile(textRead);
        String s = (String) thing.read();
        in.close();
        System.out.println(s);
    }
}
